package com.edu.service.impl;

import java.util.List;

import com.edu.bean.Carinfo;
import com.edu.bean.Page;
import com.edu.dao.CarinfoDao;
import com.edu.dao.impl.CarinfoDaoImpl;
import com.edu.service.CarinfoService;

public class CarinfoServiceImpl implements CarinfoService {
	CarinfoDao cd = new CarinfoDaoImpl();
	@Override
	public Page<Carinfo> selectcarinfo(Carinfo carinfo, int pageNum, int pageSize) {
		List<Carinfo> listcarinfo = cd.getcarinfoall(pageNum, pageSize);
		int row = cd.selectAllcarinfo(carinfo);
		Page<Carinfo> carinfoPage = new Page(listcarinfo,pageNum,pageSize,row);
		return carinfoPage;
	}
	@Override
	public int delectcarinfo(int carinfoid) {
		// TODO Auto-generated method stub
		return cd.delectcarinfo(carinfoid);
	}
	@Override
	public Carinfo selectcarinfoid(int carinfoid) {
		// TODO Auto-generated method stub
		return cd.selectcarinfoid(carinfoid);
	}
	@Override
	public int updatecarinfo(Carinfo carinfo) {
		// TODO Auto-generated method stub
		return cd.updatecarinfo(carinfo);
	}
	@Override
	public int addcarinfo(Carinfo carinfo) {
		// TODO Auto-generated method stub
		return cd.addcarinfo(carinfo);
	}

}
